<?php
	$image_path = './assets/link_img/thumbs/' . $partner_link->image;
                        if ($partner_link->image != '') {
                            if (file_exists($image_path)) {
                                $image_path = base_url() . 'assets/link_img/thumbs/' . $partner_link->image;
                            } else {
                                $image_path = base_url() . 'assets/link_img/no_photo/no_photo.jpg';
                            }
                        }  else {
                           	$image_path = base_url() . 'assets/link_img/no_photo/no_photo.jpg';
                        }
?>
<?php if (!empty($error_string)): ?>
    <!-- Woops... -->
    <div class="error_box">
    <?php echo $error_string; ?>
</div>
<?php endif; ?>
    <div id="content">
        <div id="title_content"><?php echo lang('edit_profile')." "."partner link" ?></div>
    <?php echo form_open_multipart('admin_link/edit_partner_link/' . $partner_link->id); ?>
    <table class="form_content" width="100%">
    	 <tr>
             <td>Link <span style="color:red">*</span></td>
            <td>
                <?php if (form_error('link') != "") {
                ?> <div class="form_error"><?php echo generate_pure_text(form_error('link'), '<p>', '</p>'); ?></div> <?php } ?>
                <input type="text" class="form_input" name="link" size="35" maxlength="40" value="<?php echo set_value('link', $partner_link->link); ?>" /></td>
        </tr>
        <tr>
            
             <td><?php echo lang("title");?> <span style="color:red">*</span></td>
            <td>
            <?php if (form_error('title')!=""){?> <div class="form_error"><?php echo generate_pure_text(form_error('title'), '<p>', '</p>'); ?></div> <?php } ?>
                    <input type="text" class="form_input" name="title" size="35" maxlength="40" value="<?php  echo set_value('title', $partner_link->title); ?>" /></td>
        </tr>
        
         <tr>
            <td width="10%"><?php echo "Image" ?></td>
            <td>
            	<img src="<?php echo $image_path;?>" alt="<?php echo $partner_link->image; ?>" width="150" height="140" />
            </td>
        </tr>
        
         <tr>
                 <td>Image <span style="color:red"></span></td>
           <td> 
           <?php if (form_error('userfile')!=""){?> <div class="form_error"><?php echo generate_pure_text(form_error('userfile'), '<p>', '</p>'); ?></div> <?php } ?>
           <input type="file"  name="userfile" size="30" />
           </td>
       </tr>
        
           
        <tr>
            <td colspan="2"><input type="submit" name="edit_partner_link" value="<?php echo lang('edit_profile')?>" class="form_submit" /></td>
        </tr>
    </table>
    <?php echo form_close(); ?>
</div>
<!--END content-->
